package com.ming.from;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BookRentForm {

    /**
     * 借阅id
     */
    @TableId(value = "rent_id", type = IdType.AUTO)
    private Integer rentId;

    /**
     * 被借书的id
     */
    @TableField(value = "book_id")
    private Integer bookId;

    /**
     * 被借书名称
     */
    @TableField(value = "book_name")
    private String bookName;

    /**
     * 借阅人
     */
    @TableField(value = "rent_name")
    private String rentName;

    /**
     * 借阅人手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 借阅开始时间
     */
    @TableField(value = "begin_time")
    private String beginTime;

    /**
     * 节约结束时间
     */
    @TableField(value = "end_time")
    private String endTime;

    /**
     * 借阅时间
     */
    @NotBlank(message = "借阅时间不能为空")
    private String rentTime;

    /**
     * 借阅状态  0 未归还     1 已归还
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 操作者id
     */
    @TableField(value = "handler_id")
    private Integer handlerId;

    /**
     * 创建时间
     */
    @TableField(value = "update_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private Date updateTime;
}
